package com.fduss.artStore.dao;

import com.fduss.artStore.entity.Genre;

import java.util.List;

/**
 * @Author duocai wu
 * @Date 2017/6/24
 * @Time 19:52
 */
public interface GenreDao {

    /**
     *
     * @param genre
     * @return a genre with genre id
     */
    Genre add(Genre genre);

    void delete(int genreId);

    Genre getOne(int genreId);

    /**
     * search ArtworkSubject relation table to find genre id first,
     * then getOne(genretId)
     * @param artworkId
     * @return
     */
    Genre getByArtwork(int artworkId);

    List<Genre> getAll();
}
